package com.xsomnus.open.imv2.foo.client.handler;

import com.xsomnus.open.imv2.protocol.response.ListGroupMemberResponsePacket;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;

/**
 * @author @xsomnus666_xiawenye★
 * @since 2019/4/26 0026 10:51
 * 当你发现自己的才华撑不起野心时，就请安静下来学习吧
 */
public class ListGroupMemberResponseHandler extends SimpleChannelInboundHandler<ListGroupMemberResponsePacket> {
    @Override
    protected void channelRead0(ChannelHandlerContext ctx, ListGroupMemberResponsePacket responsePacket) throws Exception {
        if (responsePacket.isSuccess()) {
            System.out.println("群[" + responsePacket.getGroupId() + "]中的人包括：" + responsePacket.getSessionList());
        } else {
            System.out.println(responsePacket.getReason());
        }

    }
}
